[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
sector() Draw an Elliptical Sector
#include <graphics.h>
void far sector(x, y, stangle, endangle, xradius, yradius);
int x, y; Center point
int stangle, Starting angle
int endangle; Ending angle
int xradius; Horizontal radius
int yradius; Vertical radius
This function is the same as pieslice, except that it draws an
elliptical pie slice. The center point is at (x, y), stangle
and endangle are the starting and ending angles, the
horizontal radius is xradius, and the vertical radius is
yradius.
Returns: Nothing.
-------------------------------- Example ---------------------------------
The following statements draw a sector filled with red, backslashed
lines.
#include <graphics.h>
#include <conio.h>
int gdriver = DETECT;
int gmode;
main()
{
struct fillsettingstype saveset;
initgraph(&gdriver,&gmode,"");
getfillsettings(&saveset);
setfillstyle(BKSLASH_FILL,RED);
sector(100,100,0,134,29, 49);
getch();
closegraph();
}
See Also:
arc()
circle()
ellipse()
getarccoords()
pieslice()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson